class TMS {
    bind() {
        return this
    }

    navigateToPlugin(setting) {
        const { url, appId, events, _private } = setting
        const prefix = _private? 'plugin-private': 'plugin'

        let param = {
            url: `${prefix}://${appId}${url}`,
        }
        if(events) {
            param.events = events
        }
        wx.navigateTo(param)
    }

}

module.exports = {
    TMSBridge: new TMS
}